package com.journey.org.ui.mine.collection

import android.os.Bundle
import com.journey.org.entity.MineCollectionEntity
import com.journey.org.ui.mine.collection.detail.CollectionDetailFragment
import com.mvvmhabit.org.base.ItemViewModel
import com.mvvmhabit.org.binding.command.BindingAction
import com.mvvmhabit.org.binding.command.BindingCommand

class CollectionItemViewModel(viewModel: CollectionViewModel, val entity: MineCollectionEntity) :
    ItemViewModel<CollectionViewModel>(viewModel) {

    val onClickDetailCommand = BindingCommand<Any>(object : BindingAction {
        override fun call() {
            val bundle = Bundle()
            bundle.putString("id", entity.id)
            viewModel.startContainerActivity(CollectionDetailFragment::class.qualifiedName, bundle)
        }
    })

}